package cn.xing.managementSystem.domain;

import cn.xing.managementSystem.enums.InformationType;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * @author cuixing
 * @package cn.xing.managementSystem.domain
 * @class Information
 * @email xing.cui@magicwindow.cn
 * @date 2018/4/25 上午11:04
 * @description
 */

@Data
@Table(name="information")
@Entity
public class Information extends BaseEntity{

    @JSONField(name = "title")
    @JsonProperty("title")
    @Column(name="title")
    private String title;

    @Enumerated
    @JSONField(name = "information_type")
    @JsonProperty("information_type")
    @Column(name="information_type")
    private InformationType informationType;

    @JSONField(name = "image_store")
    @JsonProperty("image_store")
    @OneToOne
    @JoinColumn(name="image_store_id")
    private ImageStore imageStore;


    @JSONField(name = "describe")
    @JsonProperty("describe")
    @Column(name="information_describe")
    private String describe;

    @JSONField(name = "information_detail")
    @JsonProperty("information_detail")
    @Column(name="information_detail")
    private String informationDetail;


}